<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<!-- blueprint CSS framework -->
<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl;?>/backend/css/screen.css"
	media="screen, projection" />
<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl;?>/backend/css/print.css"
	media="print" />
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="/demo/backend/assets/986d294a/css/ie.css" media="screen, projection" />
<![endif]-->

<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl;?>/backend/css/main.css" />
<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl;?>/backend/css/form.css" />
<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl;?>/backend/css/prettyPhoto.css" />

<link
	href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
	rel="stylesheet" type="text/css" />
<script
	src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script type="text/javascript"
	src="<?php echo Yii::app()->request->baseUrl;?>/backend/js/jquery.yiiactiveform.js"></script>
<script type="text/javascript"
	src="<?php echo Yii::app()->request->baseUrl;?>/backend/js/jquery-ui.min.js"></script>
<script type="text/javascript"
	src="<?php echo Yii::app()->request->baseUrl;?>/backend/js/backend.js"></script>
<script type="text/javascript"
	src="<?php echo Yii::app()->request->baseUrl;?>/backend/js/jquery.prettyPhoto.js"></script>
<title><?php echo $this->pageTitle;?></title>

<script type="text/javascript" charset="utf-8">
	  $(document).ready(function(){
	    $("a[rel^='prettyPhoto']").prettyPhoto({show_title: true,social_tools: '',deeplinking: false});
	  });
</script>
</head>
<body>
<?php
 if(isset($_SESSION['isdangnhap']))
{
	if($_SESSION['isdangnhap']==true)
	{
		$this->redirect(Yii::app()->request->baseUrl .'/backend/admin');
	}
}
?>
	<div class="container" id="page">
		<div id="header-login" style="margin: 0 auto; text-align: center">
			<div style="padding-top: 60px">
				<img
					src="<?php echo Yii::app()->request->baseUrl;?>/backend/images/logo.png" />
			</div>
		</div>
		<div id="site-content"
			style="margin: 0 auto; width: 400px; border-top: 0px">

			
			<div class="form">
				<form id="login-content"
					action="<?php echo Yii::app()->request->baseUrl;?>/backend/admin/login" method="post">
					<div class="notification noteinformation png_bg">
						<div><?php if(isset($error)){echo $error;}else{echo 'Nhập username và password để đăng nhập';}?></div>
					</div>

					<div>
						<div style="text-align: right; display: none" class="errorMessage"
							id="UserLoginForm_username_em_"></div>
						<label for="UserLoginForm_username">Username/Email</label> <input
							class="text-input" name="username"
							id="UserLoginForm_username" type="text" />
					</div>
					<div class="clear"></div>

					<div>
						<div style="text-align: right; display: none" class="errorMessage"
							id="UserLoginForm_password_em_"></div>
						<label for="UserLoginForm_password">Password</label> <input
							class="text-input" name="password"
							id="UserLoginForm_password" type="password" />
					</div>
					<div class="clear"></div>
					<div id="remember-password" style="float: right;">
						<input id="ytUserLoginForm_rememberMe" type="hidden" value="0"
							name="UserLoginForm[rememberMe]" /><input
							style="float: left; margin-right: 5px;"
							name="UserLoginForm[rememberMe]" id="UserLoginForm_rememberMe"
							value="1" type="checkbox" /> <label
							for="UserLoginForm_rememberMe">Remember me</label>
						<div class="errorMessage" id="UserLoginForm_rememberMe_em_"
							style="display: none"></div>
					</div>

					<div class="clear"></div>
					<div>
						<input id="login-content-button" class="bebutton" type="submit"
							name="btn_login" value="Login" />
					</div>
					<br class="clear" />



				</form>
			</div>
			<!-- form -->

		</div>
	</div>
	<!-- page -->

	<script type="text/javascript">
/*<![CDATA[*/
jQuery(function($) {
$('#login-content').yiiactiveform({'validateOnSubmit':true,'attributes':[{'id':'UserLoginForm_username','inputID':'UserLoginForm_username','errorID':'UserLoginForm_username_em_','model':'UserLoginForm','name':'username','enableAjaxValidation':false,'clientValidation':function(value, messages, attribute) {

if($.trim(value)=='') {
	messages.push("Username\/Email cannot be blank.");
}

}},{'id':'UserLoginForm_password','inputID':'UserLoginForm_password','errorID':'UserLoginForm_password_em_','model':'UserLoginForm','name':'password','enableAjaxValidation':false,'clientValidation':function(value, messages, attribute) {

if($.trim(value)=='') {
	messages.push("Password cannot be blank.");
}

}},{'id':'UserLoginForm_rememberMe','inputID':'UserLoginForm_rememberMe','errorID':'UserLoginForm_rememberMe_em_','model':'UserLoginForm','name':'rememberMe','enableAjaxValidation':false,'clientValidation':function(value, messages, attribute) {

if($.trim(value)!='' && value!="1" && value!="0") {
	messages.push("Remember me must be either 1 or 0.");
}

}}]});
});
/*]]>*/

</script>
</body>
</html>
